package com.wangx1n.boobey.controller;

import com.wangx1n.boobey.util.WxTool;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author wangxin
 * @create 2020-06-14 16:40
 */
@RestController
public class OpenidController {
    @RequestMapping(value = "/openid",method = RequestMethod.GET)
    public String getOpenid(String code){
        return WxTool.code2Session(code);
    }
}
